home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / diff 2.6 / src / diff.r < prev    next >
Encoding:
Text File  |  1993-11-15  |  10.1 KB  |  399 lines  |  [TEXT/MPS ]

  1. /*********************************************************************
  2. Project    :    Diff                -    GNU Diff
  3. File        :    Diff.r            -    Commando dialog
  4. Author    :    Matthias Neeracher <neeri@iis.ethz.ch>
  5. Started    :    31Dec92                                Language    :    MPW C
  6. Last        :    31Dec92
  7. *********************************************************************/
  8.  
  9. include "diff.rsrc";
  10.  
  11. #include "SysTypes.r"        /* To get system types */
  12. #include "Types.r"            /* To get general types */
  13. #include "Cmdo.r"                /* For commando interface */
  14.  
  15. resource 'vers' (1) {
  16.     0x02, 0x20, final, 0x00, verUS,
  17.     "2.3",
  18.     "Diff"
  19.     };
  20.     
  21. resource 'vers' (2) {
  22.     0x02, 0x20, final, 0x00, verUS,
  23.     "2.3",
  24.     "Diff 2.3 (23May93)"
  25.     };
  26.  
  27. resource 'cmdo' (128) {
  28.     {
  29.         295,            /* Height of dialog */
  30.         "GNU Diff -- Find differences between two files/directories",
  31.         {
  32.             notDependent {}, RadioButtons {
  33.                 {
  34.                     { 85,  15, 100, 125}, "Normal/Other", "", set, 
  35.                     "Use normal format or choose format from \"Input Options\".",
  36.                     {105,  15, 120, 125}, "Brief", "--brief", notset, 
  37.                     "Report only whether files differ, not the details of the differences.",
  38.                     {125,  15, 140, 125}, "Context", "--context", notset, 
  39.                     "Show differences in context.",
  40.                     {145,  15, 160, 125}, "Conditional", "--ifdef", notset, 
  41.                     "Merge files, conditional to an #ifdef macro.",
  42.                     {165,  15, 180, 125}, "Side by Side", "--side-by-side", notset, 
  43.                     "Show files side by side."
  44.                 }
  45.             },
  46.             And { { (3<<12) + 1 } }, RegularEntry {
  47.                 "Lines",
  48.                 {125, 130, 140, 180}, 
  49.                 {125, 185, 141, 250},
  50.                 "3",
  51.                 ignoreCase,
  52.                 "-C",
  53.                 "How many lines of context to provide."
  54.             },
  55.             And { { (4<<12) + 1 } }, RegularEntry {
  56.                 "Macro",
  57.                 {145, 130, 160, 180}, 
  58.                 {145, 185, 161, 250},
  59.                 "",
  60.                 ignoreCase,
  61.                 "",
  62.                 "Preprocessor macro name."
  63.             },
  64.             And { { (5<<12) + 1 } }, RegularEntry {
  65.                 "Width",
  66.                 {165, 130, 180, 180}, 
  67.                 {165, 185, 181, 250},
  68.                 "130",
  69.                 ignoreCase,
  70.                 "--width",
  71.                 "Width of output lines."
  72.             },
  73.             notDependent {}, NestedDialog    {
  74.                 2,
  75.                 { 17, 275,  37, 460},
  76.                 "Input Options…",
  77.                 "Further options affecting input processing."
  78.             },
  79.             notDependent {}, NestedDialog    {
  80.                 3,
  81.                 { 44, 275,  64, 460},
  82.                 "Output Options…",
  83.                 "Further options affecting output processing."
  84.             },
  85.             notDependent {}, Files {
  86.                 InputFileOrDir,
  87.                 OptionalFile {
  88.                     { 20,  10,  36, 48},
  89.                     { 18,  50,  38, 235},
  90.                     "From",
  91.                     "", "", "",
  92.                     "Select from-file/folder.",
  93.                     dim,
  94.                     "",
  95.                     "Select from-file/folder…",
  96.                     "",
  97.                 },
  98.                 Additional {
  99.                     "",
  100.                     FilterTypes,
  101.                     "Text Files",
  102.                     "All Files",
  103.                     {text}
  104.                 }
  105.             },
  106.             notDependent {}, Files {
  107.                 InputFileOrDir,
  108.                 OptionalFile {
  109.                     { 47,  10,  63,  48},
  110.                     { 45,  50,  65, 235},
  111.                     "To",
  112.                     "", "", "",
  113.                     "Select to-file/folder.",
  114.                     dim,
  115.                     "",
  116.                     "Select to-file/folder…",
  117.                     "",
  118.                 },
  119.                 Additional {
  120.                     "",
  121.                     FilterTypes,
  122.                     "Text Files",
  123.                     "All Files",
  124.                     {text}
  125.                 }
  126.             },
  127.             notDependent {}, Redirection {
  128.                 StandardOutput,
  129.                 { 90,  275}
  130.             },
  131.             notDependent {}, Redirection {
  132.                 DiagnosticOutput,
  133.                 {140,  275}
  134.             },
  135.             notDependent {}, TextBox {
  136.                 gray,
  137.                 { 75,  10, 185, 260},
  138.                 "Format"
  139.             },
  140.             notDependent {}, TextBox {
  141.                 gray,
  142.                 { 75, 265, 185, 470},
  143.                 "Redirection"
  144.             },
  145.             notDependent {}, VersionDialog {
  146.                 VersionString {
  147.                     "2.6"
  148.                 },
  149.                 "GNU Diff by David MacKenzie, Paul Eggert, and Richard Stallman\n"
  150.                 "MPW port by Matthias Neeracher <neeri@iis.ee.ethz.ch>\n",
  151.                 0
  152.             },
  153.             And {{7,8}}, DoItButton {
  154.             },
  155.         },
  156.         270,
  157.         "",
  158.         {
  159.             notDependent {}, CheckOption {
  160.                 NotSet,{ 35,  20,  51, 200}, "Case", "--ignore-case", 
  161.                 "Ignore changes in case."
  162.             },
  163.             And {{-3}}, CheckOption {
  164.                 NotSet,{ 55,  20,  71, 200}, "Spacing changes", "--ignore-space-change", 
  165.                 "Treat all whitespace runs as one space."
  166.             },
  167.             And {{-2}}, CheckOption {
  168.                 NotSet,{ 75,  20,  91, 200}, "All spaces", "--ignore-all-space", 
  169.                 "Ignore whitespace when comparing lines."
  170.             },
  171.             notDependent {}, CheckOption {
  172.                 NotSet,{ 95,  20, 111, 200}, "Blank lines", "--ignore-blank-lines", 
  173.                 "Ignore changes that just insert or delete blank lines."
  174.             },
  175.             notDependent {}, RegularEntry {
  176.                 "Lines matching",             
  177.                 {116,  37, 132, 140}, 
  178.                 {117, 150, 132, 228}, 
  179.                 "", 
  180.                 keepCase, 
  181.                 "--ignore-matching-lines", 
  182.                 "Ignore changes that just insert or delete lines matching the expression."
  183.             },
  184.             notDependent {}, CheckOption {
  185.                 NotSet,{ 35, 255,  51, 435}, "Recursive Comparison", "--recursive", 
  186.                 "Recursively compare subdirectories."
  187.             },
  188.             notDependent {}, CheckOption {
  189.                 NotSet,{ 55, 255,  71, 435}, "Create nonexisting files", "--new-file", 
  190.                 "Treat nonexisting files as present but empty."
  191.             },
  192.             notDependent {}, CheckOption {
  193.                 NotSet,{ 75, 255,  91, 435}, "Report identical files", "--report-identical-files", 
  194.                 "Report when two files are the same."
  195.             },
  196.             notDependent {}, RegularEntry {
  197.                 "Start with",             
  198.                 { 96, 272, 112, 375}, 
  199.                 { 97, 385, 112, 463}, 
  200.                 "", 
  201.                 keepCase, 
  202.                 "--starting-file", 
  203.                 "Start in the middle of directories."
  204.             },
  205.             notDependent {}, RegularEntry {
  206.                 "Ignore pattern",             
  207.                 {116, 272, 132, 375}, 
  208.                 {117, 385, 132, 463}, 
  209.                 "", 
  210.                 keepCase, 
  211.                 "--exclude", 
  212.                 "Ignore files and subdirectories matching the pattern."
  213.             },
  214.             notDependent {}, RegularEntry {
  215.                 "Ignore file",             
  216.                 {136, 272, 152, 375}, 
  217.                 {137, 385, 152, 463}, 
  218.                 "", 
  219.                 keepCase, 
  220.                 "--exclude-from", 
  221.                 "Ignore files and subdirectories matching any pattern in file."
  222.             },
  223.             notDependent {}, TextBox {
  224.                 gray,
  225.                 { 25,  10, 160, 235},
  226.                 "Ignore…"
  227.             },
  228.             notDependent {}, TextBox {
  229.                 gray,
  230.                 { 25, 245, 160, 470},
  231.                 "Directory Options"
  232.             },
  233.         },
  234.         270,
  235.         "",
  236.         {
  237.             And {{-2}}, CheckOption {
  238.                 NotSet,{ 35,  20,  51, 200}, "Left column only", "--left-column", 
  239.                 "Show only left column of matching lines."
  240.             },
  241.             And {{-1}}, CheckOption {
  242.                 NotSet,{ 55,  20,  71, 200}, "Suppress common lines", "--suppress-common-lines", 
  243.                 "Don't show matching lines"
  244.             },
  245.             notDependent {}, CheckOption {
  246.                 NotSet,{110,  20, 126, 200}, "Expand tabulators", "--expand-tabs", 
  247.                 "Expand tabulators to spaces."
  248.             },
  249.             notDependent {}, CheckOption {
  250.                 NotSet,{130,  20, 146, 200}, "Initial tab", "--initial-tab", 
  251.                 "Start lines with tab instead of space."
  252.             },
  253.             And {{-6}}, CheckOption {
  254.                 NotSet,{ 35, 255,  51, 435}, "Show C function headers", "--show-c-function", 
  255.                 "Show which C function each change is in."
  256.             },
  257.             And {{-5}}, RegularEntry {
  258.                 "Show match",             
  259.                 { 56, 272,  72, 375}, 
  260.                 { 57, 385,  72, 463}, 
  261.                 "", 
  262.                 keepCase, 
  263.                 "--show-function-line", 
  264.                 "For each diff, show some of the last line that matched the pattern."
  265.             },
  266.             notDependent {}, RegularEntry {
  267.                 "From Label",             
  268.                 { 76, 272,  92, 375}, 
  269.                 { 77, 385,  92, 463}, 
  270.                 "", 
  271.                 keepCase, 
  272.                 "--label", 
  273.                 "Use label instead of file name for from-file."
  274.             },
  275.             And {{7}}, RegularEntry {
  276.                 "To label",             
  277.                 { 96, 272, 112, 375}, 
  278.                 { 97, 385, 112, 463}, 
  279.                 "", 
  280.                 keepCase, 
  281.                 "--label", 
  282.                 "Use label instead of file name for to-file."
  283.             },
  284.             notDependent {}, NestedDialog    {
  285.                 4,
  286.                 {132, 275, 152, 460},
  287.                 "Output Formats…",
  288.                 "Specify your own output formats."
  289.             },
  290.             notDependent {}, TextBox {
  291.                 gray,
  292.                 { 25,  10,  80, 235},
  293.                 "Side by Side Options"
  294.             },
  295.             notDependent {}, TextBox {
  296.                 gray,
  297.                 { 95,  10, 160, 235},
  298.                 "Tabulator Options"
  299.             },
  300.             notDependent {}, TextBox {
  301.                 gray,
  302.                 { 25, 245, 120, 470},
  303.                 "Labelling"
  304.             },
  305.         },
  306.         230,
  307.         "",
  308.         {
  309.             notDependent {}, RegularEntry {
  310.                 "Old lines",             
  311.                 { 36,  20,  52, 115}, 
  312.                 { 37, 120,  52, 228}, 
  313.                 "", 
  314.                 keepCase, 
  315.                 "--old-line-format", 
  316.         "Formats lines just from the first file. Conversion specifications are:\n"
  317.         "%l current line without newline. %L current line including newline.\n"
  318.         "%n newline. %0 null character. %% percent character."
  319.             },
  320.             notDependent {}, RegularEntry {
  321.                 "New lines",             
  322.                 { 56,  20,  72, 115}, 
  323.                 { 57, 120,  72, 228}, 
  324.                 "", 
  325.                 keepCase, 
  326.                 "--new-line-format", 
  327.         "Formats lines just from the second file. Conversion specifications are:\n"
  328.         "%l current line without newline. %L current line including newline.\n"
  329.         "%n newline. %0 null character. %% percent character."
  330.             },
  331.             notDependent {}, RegularEntry {
  332.                 "Common lines",             
  333.                 { 76,  20,  92, 115}, 
  334.                 { 77, 120,  92, 228}, 
  335.                 "", 
  336.                 keepCase, 
  337.                 "--unchanged-line-format", 
  338.         "Formats lines common to both files. Conversion specifications are:\n"
  339.         "%l current line without newline. %L current line including newline.\n"
  340.         "%n newline. %0 null character. %% percent character."
  341.                 },
  342.             notDependent {}, RegularEntry {
  343.                 "Old groups",             
  344.                 { 36, 255,  52, 360}, 
  345.                 { 37, 365,  52, 463}, 
  346.                 "", 
  347.                 keepCase, 
  348.                 "--old-group-format", 
  349.         "Formats groups of lines from the first file. Conversion specifications are:\n"
  350.         "%< lines from first file.\n"
  351.         "%n newline. %0 null character. %% percent character."
  352.             },
  353.             notDependent {}, RegularEntry {
  354.                 "New groups",             
  355.                 { 56, 255,  72, 360}, 
  356.                 { 57, 365,  72, 463}, 
  357.                 "", 
  358.                 keepCase, 
  359.                 "--new-group-format", 
  360.         "Formats groups of lines from the second file. Conversion specifications are:\n"
  361.         "%> lines from second file.\n"
  362.         "%n newline. %0 null character. %% percent character."
  363.             },
  364.             notDependent {}, RegularEntry {
  365.                 "Common groups",             
  366.                 { 76, 255,  92, 360}, 
  367.                 { 77, 365,  92, 463}, 
  368.                 "", 
  369.                 keepCase, 
  370.                 "--unchanged-group-format", 
  371.         "Formats groups of lines common to both files. Conversion specifications:\n"
  372.         "%= common lines.\n"
  373.         "%n newline. %0 null character. %% percent character."
  374.                 },
  375.             notDependent {}, RegularEntry {
  376.                 "Changed groups",             
  377.                 { 96, 255, 112, 360}, 
  378.                 { 97, 365, 112, 463}, 
  379.                 "", 
  380.                 keepCase, 
  381.                 "--changed-group-format", 
  382.         "Formats groups of lines from to both files. Conversion specifications are:\n"
  383.         "%< lines from first file. %> lines from second file. %= common lines.\n"
  384.         "%n newline. %0 null character. %% percent character."
  385.                 },
  386.             notDependent {}, TextBox {
  387.                 gray,
  388.                 { 25,  10, 120, 235},
  389.                 "Line Formats"
  390.             },
  391.             notDependent {}, TextBox {
  392.                 gray,
  393.                 { 25, 245, 120, 470},
  394.                 "Group Formats"
  395.             },
  396.         }
  397.     }
  398. };
  399.